<?php

require_once($baseDir . '/lib/model/FriendList.php');

class FriendCnt {

	public $oFriendList;

	public function __construct() {
		$this->oFriendList = new FriendList();
	}

	public function invoke() {

		global $baseDir;
		$oFriendList = $this->oFriendList;
		if(isset($_GET['key'])) {
			$oFriendList->setKey($_GET['key']);
			$oFriend = $oFriendList->fetch();
			include $baseDir . '/lib/view/friendone.php';
		}else {
			$aFriend = $oFriendList->fetch();
			include $baseDir . '/lib/view/friendlist.php';
		}
	}
}